﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace POSGui.Clases.Entities
{
    /// <summary>
    /// Clase que maneja la venta
    /// </summary>
    [DataContract]
    public class Sale
    {
        [DataMember]
        public int SaleId { get; set; }
        [DataMember]
        public int UserId { get; set; }
        [DataMember]
        public int CashierId { get; set; }
        [DataMember]
        public SaleStatus SaleStatus { get; set; }
        [DataMember]
        public ERPSIA.Currency Currency { get; set; }
        [DataMember]
        public string PayMethod { get; set; }
        [DataMember]
        public DateTime StartDate { get; set; }
        [DataMember]
        public DateTime FinishDate { get; set; }
        [DataMember]
        public double Balance { get; set; }
        [DataMember]
        public List<Product> Products { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public Sale()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public Sale(double balance, int cashierId, ERPSIA.Currency currency, DateTime finishDate, string payMethod, List<Product> products, int saleId, SaleStatus saleStatus, DateTime startDate, int userId)
        {
            Balance = balance;
            CashierId = cashierId;
            Currency = currency;
            FinishDate = finishDate;
            PayMethod = payMethod;
            Products = products;
            SaleId = saleId;
            SaleStatus = saleStatus;
            StartDate = startDate;
            UserId = userId;
        }
    }
}
